<!-- 未确认出库单 -->
<template>
  <div>
    <el-table
      :data="OutBillList"
      :height="cardHeight"
      style="width: 100%"
      border
      @row-click="outBillRowClick"
    >
      <el-table-column prop="billNumber" label="出库单号" width="180">
        <template #default="{ row }">
          <el-link type="primary" :underline="false" style="font-size: 12px">
            {{ row.billNumber }}
          </el-link>
        </template>
      </el-table-column>
      <el-table-column prop="outDate" label="出库时间" width="180"> </el-table-column>
      <el-table-column prop="recipient" label="接收人"> </el-table-column>
      <el-table-column prop="labelType" label="出库类型">
        <template #default="{ row }">
          <el-tag size="small" v-if="row.labelType == 0">盒出库</el-tag>
          <el-tag size="small" type="info" v-else>档案出库</el-tag>
        </template>
      </el-table-column>
    </el-table>
    <outBillDialog ref="outBillDialog" @ok="getOutBillList"></outBillDialog>
  </div>
</template>

<script>
import outBillDialog from '@/views/rfid/dialog/outBillDialog.vue'
import { queryOutBillList } from '@/api/rfid/board'
export default {
  name: 'UnconfirmedOutBill',
  components: {
    outBillDialog,
  },
  props: {
    cardHeight: {
      type: Number,
      default: 250,
    },
  },
  data() {
    return {
      OutBillList: [],
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {
    this.getOutBillList()
  },
  methods: {
    // 未确认出库单的行点击事件
    outBillRowClick(row, column, event) {
      this.$refs.outBillDialog.confirm(row)
    },
    // 获取未确认出库单的数据
    getOutBillList() {
      queryOutBillList().then((res) => {
        if (res.data.code === 200) {
          this.OutBillList = res.data.data
        }
      })
    },
  },
}
</script>
<style lang="less" scoped></style>
